import os
import pandas as pd


ebk_count = 120

def output_ebk(dfi, filename):
    with open(filename, "w", encoding='ANSI') as f:
        c = ebk_count
        for code in dfi["代码"]:
            if int(code) > 599999:
                f.write("\n1" + str(code))
            else:
                f.write("\n0" + str(code))
            c -= 1
            if c <= 0:
                break
